package ac.github.os.listener.hook

import ac.github.os.api.OriginSkillAPI
import ac.github.os.internal.core.holder.player.PlayerInteractAdyEntityHolder
import ac.github.os.internal.core.trigger.PlayerTrigger
import ink.ptms.adyeshach.api.event.AdyeshachEntityInteractEvent
import taboolib.common.platform.event.OptionalEvent
import taboolib.common.platform.event.SubscribeEvent

object AdyeshachListener {

    @SubscribeEvent(bind = "ink.ptms.adyeshach.api.event.AdyeshachEntityInteractEvent")
    fun e(ope: OptionalEvent) {
        val event = ope.get<AdyeshachEntityInteractEvent>()
        val holder = PlayerInteractAdyEntityHolder(event)
        OriginSkillAPI.cast(PlayerTrigger(event.player),holder)
    }

}